home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / Direct3D / DolphinVS / readme.txt < prev    next >
Text File  |  2001-10-10  |  2KB  |  57 lines

  1. //-----------------------------------------------------------------------------
  2. // Name: DolphinVS Direct3D Sample
  3. // 
  4. // Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
  5. //-----------------------------------------------------------------------------
  6.  
  7.  
  8. Description
  9. ===========
  10.    The DolphinVS sample shows an underwater scene of a dolphin swimming, with
  11.    caustic effects on the dolphin and seafloor. The dolphin is animated using
  12.    a technique called "tweening". The underwater effect simply uses fog, and
  13.    the water caustics use an animated set of textures. These effects are
  14.    achieved using vertex shaders
  15.  
  16.  
  17. Path
  18. ====
  19.    Source:     DXSDK\Samples\Multimedia\D3D\DolphinVS
  20.    Executable: DXSDK\Samples\Multimedia\D3D\Bin
  21.  
  22.  
  23. User's Guide
  24. ============
  25.    The following keys are implemented. The dropdown menus can be used for the
  26.    same controls.
  27.       <Enter>     Starts and stops the scene
  28.       <Space>     Advances the scene by a small increment
  29.       <F1>        Shows help or available commands.
  30.       <F2>        Prompts user to select a new rendering device or display mode
  31.       <Alt+Enter> Toggles between fullscreen and windowed modes
  32.       <Esc>       Exits the app.
  33.  
  34.  
  35. Programming Notes
  36. =================
  37.    Several things are happening in this sample. First of all is the use of 
  38.    vertex shaders. Two vertex shaders are used: one for the dolphin, and one
  39.    for the seafloor. The vertex shaders are assembly instructions which are 
  40.    assembled from two files, DolphinTween.vsh and SeaFloor.vsh.
  41.  
  42.    The dolphin is tweened (a form of morphing) by passing three versions of
  43.    the dolphin down in multiple vertex streams. The vertex shader takes the
  44.    weighted positions of each mesh and produces and output position. The vertex
  45.    is then lit, gets tex coords computed and gets fog added.
  46.  
  47.    The seafloor is handled similiarly, just with no need for tweening. The
  48.    caustic effects are added in a separate alpha-blended pass, using an 
  49.    animated set of 32 textures. The texture coordinates for the caustics are
  50.    generated in the vertex shaders, stored as TEXCOORDINDEX stage 1.
  51.  
  52.    This sample makes use of common DirectX code (consisting of helper functions,
  53.    etc.) that is shared with other samples on the DirectX SDK. All common
  54.    headers and source code can be found in the following directory:
  55.       DXSDK\Samples\Multimedia\Common
  56.  
  57.